import {WidgetClass} from "./widget";

export class WidgetListCell extends WidgetClass {
  constructor(options = {}) {
    super(options);
    const {ports} = options
    if (ports) {
      this.ports = ports;
    } else {
      this.ports = this.assembleDefaultPorts();
    }
  }

  assembleDefaultPorts() {
    const superState = super.assembleDefaultPorts();
    return {
      ...superState,
      events: [
        {
          name: "值改变事件",
          key: `valueChange-${this.id}`,
          eventType: "valueChange",
          type: "event",
          action: [],
        }
      ],
    };
  }
}
